package org.example.browserview;

import android.app.Activity;
import android.os.Bundle;

import android.webkit.WebView;
import android.widget.EditText;

public class BrowserViewActivity extends Activity {
	EditText uriText = null;
	WebView webView = null;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        uriText = (EditText) findViewById(R.id.url_field);        
        webView = (WebView) findViewById(R.id.web_view);
        openBrowser();
    }

	private void openBrowser() {
		// TODO Auto-generated method stub
		webView.getSettings().setJavaScriptEnabled(true);
		webView.loadUrl(uriText.getText().toString());
	}
}